<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <f:view contentType="text/html">
        <h:head>
            <f:facet name="first">
                <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
                <title>PrimeFaces</title>
            </f:facet>
        </h:head>

        <h:body>

            <p:layout fullPage="true">

                <p:layoutUnit position="north" size="80" resizable="true" closable="true" collapsible="true">                    
                    <center><h3>DEPARTAMENTO DE FINANZAS</h3></center>
                </p:layoutUnit>

                <p:layoutUnit position="south" size="70" closable="true" collapsible="true">
                    Footer
                </p:layoutUnit>

                <p:layoutUnit position="west" size="175" header="Left" collapsible="true">
                    <!--
                    <h:form>
                    <p:link outcome="productDetail" value="Inicio">
                    <f:param name="productId" value="10" />
                    </p:link>
        <p:link outcome="productDetai" value="Inventario">
        <f:param name="roductId" value="10" />
        </p:link>
            <p:link outcome="productDeta" value="Producción">
            <f:param name="oductId" value="10" />
            </p:link>
                <p:link outcome="productDet" value="Ventas">
                <f:param name="ductId" value="10" />
                </p:link>
                    <p:link outcome="productDe" value="Compras">
                    <f:param name="uctId" value="10" />
                    </p:link>
                        </h:form> -->
                </p:layoutUnit>
                <p:layoutUnit position="center">
               
<h:form>      <!--Inicio del Modulo GENERAL-->  
    <h:panelGrid columns="1" cellpadding="3">  
        <p:growl id="messages" />
    <p:splitButton value="Ingresos" actionListener="#{buttonView.save}" update="messages" icon="">
        <p:menuitem value="Ingresar datos" onclick="PF('ingreso').show();" update="messages" icon="ui-icon-arrowrefresh-1-w" />
        <p:menuitem value="Ver estados" actionListener="#{buttonView.delete}" ajax="false" icon="ui-icon-close" />            
    </p:splitButton>            
        
    <h:form>          
    <p:dialog header="INGRESO DE DATOS" widgetVar="ingreso" focus="">        
        <h:panelGrid columns="1" cellpadding="3">
            <h:panelGrid columns="6" cellpadding="3">
            <h:outputLabel for="Departamento" value="ID:" />
            <p:inputText id="name" label="name" />
 
            <p:outputLabel value="Nombre" for="dd" />
            <p:autoComplete id="dd" dropdown="true" value="#{autoCompleteView.txt6}" completeMethod="#{autoCompleteView.completeText}" />            
            <h:outputText value="#{autoCompleteView.txt6}" />
            
            <p:commandButton value="Buscar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            </h:panelGrid>
            <h:panelGrid columns="1" cellpadding="3">
            <p:outputLabel for="popup" value="Fecha" />
            <p:calendar id="popup" value="#{calendarView.date2}" />            
            <h:outputText value="#{calendarView.date3}">
                <f:convertDateTime pattern="MM/dd/yyyy" />  
            </h:outputText>
            
            <h:outputLabel for="prefix" value="Cantidad: " />
            <p:spinner id="prefix" value="#{spinnerView.number4}" prefix="Q" min="" />
             </h:panelGrid>
            <h:outputLabel for="age" value="Descripción:" />
            <p:inputText id="age" label="age" />        
            
            <h:panelGrid columns="2" cellpadding="3">
            <p:commandButton value="Guardar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            <p:commandButton value="Cancelar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            </h:panelGrid>
            </h:panelGrid>
        <form> 
                <p:panel style="width: 70%">
            <p:dataTable var="car" value="#{dtBasicView.cars}">
                <p:column headerText="Id Departamento">
                <h:outputText value="#{car.id}" />
                </p:column>
 
                <p:column headerText="Nombre Departamento">
                <h:outputText value="#{car.year}" />
                </p:column>
 
                <p:column headerText="Cantidad">
                <h:outputText value="#{car.brand}" />
                </p:column>
 
                <p:column headerText="Fecha">
                <h:outputText value="#{car.color}" />
                </p:column>
            </p:dataTable>
                </p:panel>
        </form>    
    </p:dialog>                                     
    </h:form>
    
    
         <!--Inicio del Mudolo Egreso-->
    <p:growl id="messages2" />     
          <p:growl id="messages1" />     
    <p:splitButton value="Egresos" actionListener="#{buttonView.save}" update="messages" icon="">
        <p:menuitem value="Ingresos de Datos" onclick="PF('egreso').show();" update="messages" icon="ui-icon-arrowrefresh-1-w" />
        <p:menuitem value="Ver Estados" actionListener="#{buttonView.delete}" ajax="false" icon="ui-icon-close" />        
    </p:splitButton>
    
    <h:form>          
    <p:dialog header="EGRESO DE DATOS" widgetVar="egreso" focus=" ">        
        <h:panelGrid columns="1" cellpadding="3">
            <h:panelGrid columns="6" cellpadding="3">
            <h:outputLabel for="Departamento" value="ID:" />
            <p:inputText id="name" label="name" />
 
            <p:outputLabel value="Nombre" for="dd" />
            <p:autoComplete id="dd" dropdown="true" value="#{autoCompleteView.txt6}" completeMethod="#{autoCompleteView.completeText}" />            
            <h:outputText value="#{autoCompleteView.txt6}" />
            
            <p:commandButton value="Buscar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            </h:panelGrid>
            <h:panelGrid columns="1" cellpadding="3">
            <p:outputLabel for="popup" value="Fecha" />
            <p:calendar id="popup" value="#{calendarView.date2}" />            
            <h:outputText value="#{calendarView.date3}">
                <f:convertDateTime pattern="MM/dd/yyyy" />  
            </h:outputText>
            
            <h:outputLabel for="prefix" value="Cantidad: " />
            <p:spinner id="prefix" value="#{spinnerView.number4}" prefix="Q" min="" />
             </h:panelGrid>
            <h:outputLabel for="age" value="Descripción:" />
            <p:inputText id="age" label="age" />        
            
            <h:panelGrid columns="2" cellpadding="3">
            <p:commandButton value="Guardar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            <p:commandButton value="Cancelar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            </h:panelGrid>
            </h:panelGrid>
        <form> 
                <p:panel style="width: 70%">
            <p:dataTable var="car" value="#{dtBasicView.cars}">
                <p:column headerText="Id Departamento">
                <h:outputText value="#{car.id}" />
                </p:column>
 
                <p:column headerText="Nombre Departamento">
                <h:outputText value="#{car.year}" />
                </p:column>
 
                <p:column headerText="Cantidad">
                <h:outputText value="#{car.brand}" />
                </p:column>
 
                <p:column headerText="Fecha">
                <h:outputText value="#{car.color}" />
                </p:column>
            </p:dataTable>
                </p:panel>
        </form>    
    </p:dialog>                                     
    </h:form>
          
         <!--Inicio del Mudulo Reportes-->
    <p:splitButton value="Reportes" actionListener="#{buttonView.save}" update="messages" icon=" ">
        <p:menuitem value="Presupuestos" actionListener="#{buttonView.update}" update="messages" icon=" " />
        <p:menuitem value="Ingresos" actionListener="#{buttonView.delete}" ajax="false" icon="" />
        <p:menuitem value="Egresos" actionListener="#{buttonView.delete}" ajax="false" icon="ui-icon-close" />
    </p:splitButton>   
         <h:form>
             
    <p:commandButton value="Administrar Presupuesto" onclick="PF('dlg').show();" type="button" icon="ui-icon-extlink" />
 
    <p:dialog header="Ver Presupuestos" widgetVar="dlg">
        <h:panelGrid columns="1" cellpadding="5">
            <h:outputText
                    value="Jahova es mi Pastor y nada me faltará" />
            </h:panelGrid>
            <h:panelGrid columns="5" cellpadding="3">
 <p:outputLabel for="popup" value="Fecha Inicio" />
            <p:calendar id="popup" value="#{calendarView.date2}" />            
            <h:outputText value="#{calendarView.date3}">
                <f:convertDateTime pattern="MM/dd/yyyy" />  
            </h:outputText>
            
            <p:outputLabel for="otra" value="Fecha Final" />
            <p:calendar id="otra" value="#{calendarView.date2}" />            
            <h:outputText value="#{calendarView.date3}">
                <f:convertDateTime pattern="MM/dd/yyyy" />  
            </h:outputText>                                    
        </h:panelGrid>    
            <h:panelGrid columns="6" cellpadding="3">
            <h:outputLabel for="Departamento" value="ID:" />
            <p:inputText id="name" label="name" />
 
            <p:outputLabel value="Nombre" for="dd" />
            <p:autoComplete id="dd" dropdown="true" value="#{autoCompleteView.txt6}" completeMethod="#{autoCompleteView.completeText}" />            
            <h:outputText value="#{autoCompleteView.txt6}" />
            
            <p:commandButton value="Buscar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            </h:panelGrid>
        
        <h:form>
             
    <p:commandButton value="Finalizar" onclick="PF('fin').show();" type="button" icon="ui-icon-extlink" /> 
    <p:dialog header="Presupuesto" widgetVar="fin">
        <h:form>
    <p:dataTable id="tbl" var="car" value="#{dataExporterView.cars}"
                 paginator="true" rows="10">
        <p:column>
            <f:facet name="header">
                <h:outputText value="Id Departamento" />
            </f:facet>
            <h:outputText value="#{car.id}" />
        </p:column>
 
        <p:column>
            <f:facet name="header">
                <h:outputText value="Nombre Departamento"/>
            </f:facet>
            <h:outputText value="#{car.year}" />
        </p:column>
 
        <p:column>
            <f:facet name="header">
                <h:outputText value="Monto" />
            </f:facet>
            <h:outputText value="#{car.brand}" />
        </p:column>
 
        <p:column>
            <f:facet name="header">
                <h:outputText value="Fecha" />
            </f:facet>
            <h:outputText value="#{car.color}" />
        </p:column>
 
    </p:dataTable>
 
    <h:panelGrid columns="2">
        <p:panel header="Export All Data">
            <h:commandLink id="excel">
                <p:graphicImage name="/demo/images/excel.png" />
                <p:dataExporter type="xls" target="tbl" fileName="cars" />
            </h:commandLink>
 
            <h:commandLink id="pdf">
                <p:graphicImage name="/demo/images/pdf.png" />
                <p:dataExporter type="pdf" target="tbl" fileName="cars"/>
            </h:commandLink>
 
            <h:commandLink id="csv">
                <p:graphicImage name="/demo/images/csv.png" />
                <p:dataExporter type="csv" target="tbl" fileName="cars" />
            </h:commandLink>
 
            <h:commandLink id="xml">
                <p:graphicImage name="/demo/images/xml.png" />
                <p:dataExporter type="xml" target="tbl" fileName="cars" />
            </h:commandLink>
        </p:panel>
 
        <p:panel header="Export Page Data">
            <h:commandLink>
                <p:graphicImage name="/demo/images/excel.png" />
                <p:dataExporter type="xls" target="tbl" fileName="cars" pageOnly="true"/>
            </h:commandLink>
 
            <h:commandLink>
                <p:graphicImage name="/demo/images/pdf.png" />
                <p:dataExporter type="pdf" target="tbl" fileName="cars" pageOnly="true" />
            </h:commandLink>
 
            <h:commandLink>
                <p:graphicImage name="/demo/images/csv.png" />
                <p:dataExporter type="csv" target="tbl" fileName="cars" pageOnly="true" />
            </h:commandLink>
 
            <h:commandLink>
                <p:graphicImage name="/demo/images/xml.png" />
                <p:dataExporter type="xml" target="tbl" fileName="cars" pageOnly="true" />
            </h:commandLink>
        </p:panel>
    </h:panelGrid>
</h:form>
    </p:dialog>
</h:form>        
    </p:dialog>
</h:form>
        
         <p:growl id="messages4" />
    <p:splitButton value="Administración de Inversiones" actionListener="#{buttonView.save}" update="messages" icon="">
        <p:menuitem value="Crear Inversiones" onclick="PF('inve').show();" update="messages" icon="ui-icon-arrowrefresh-1-w" />
        <p:menuitem value="Ver estados" onclick="PF('estado').show();" update="messages" icon="ui-icon-arrowrefresh-1-w" />           
    </p:splitButton> 
         
<h:form>          
    <p:dialog header="CREAR INVERSIÓN" widgetVar="inve" focus=" ">        
        <h:panelGrid columns="1" cellpadding="3">
            
            <h:outputText
                    value="Buscar Personas o Inversionistas" />
            <h:panelGrid columns="6" cellpadding="3">
            <h:outputLabel for="Departamento" value="ID:" />
            <p:inputText id="name" label="name" /> 
            <p:outputLabel value="Persona" for="dd" />
            <p:autoComplete id="dd" dropdown="true" value="#{autoCompleteView.txt6}" completeMethod="#{autoCompleteView.completeText}" />            
            <h:outputText value="#{autoCompleteView.txt6}" />            
            <p:commandButton value="Buscar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            
            <h:form>
             
    <p:commandButton value="Crear Persona" onclick="PF('persona').show();" type="button" icon="ui-icon-extlink" />
 
    <p:dialog header="Creación de Persona" widgetVar="persona" focus="age">
        <h:panelGrid columns="2" cellpadding="5">
            <h:outputLabel for="name" value="Nombre" />
            <p:inputText id="name" label="name" />
 
            <h:outputLabel for="surname" value="Documento de Identificación" />
            <p:inputText id="surname" label="surname" />
            
            <h:outputLabel for="surname" value="Teléfonos" />
            <p:inputText id="telefono" label="surname" />
            
            <h:outputLabel for="surname" value="E-mail" />
            <p:inputText id="mail" label="surname" />
 
            <h:outputLabel for="age" value="Dirección" />
            <p:inputText id="age" label="age" />
            <p:commandButton value="Guardar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            <p:commandButton value="Cancelar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
        </h:panelGrid>
    </p:dialog>
 
</h:form>            
            </h:panelGrid>
                                    
            <h:panelGrid columns="1" cellpadding="3">
            <p:outputLabel for="popup" value="Fecha" />
            <p:calendar id="popup" value="#{calendarView.date2}" />            
            <h:outputText value="#{calendarView.date3}">
                <f:convertDateTime pattern="MM/dd/yyyy" />  
            </h:outputText>
            
            <h:outputLabel for="prefix" value="Cantidad: " />
            <p:spinner id="prefix" value="#{spinnerView.number4}" prefix="Q" min="" />
             </h:panelGrid>
            <h:outputLabel for="age" value="Descripción:" />
            <p:inputText id="age" label="age" />        
            
            <h:panelGrid columns="2" cellpadding="3">
            <p:commandButton value="Guardar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            <p:commandButton value="Cancelar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
            </h:panelGrid>
            </h:panelGrid>        
    </p:dialog>                                     
    </h:form> 
         
<h:form>
                  
    <p:dialog header="Estado" widgetVar="estado" >
        <h:panelGrid columns="2" cellpadding="5">
            <h:outputLabel for="Departamento" value="ID:" />
            <p:inputText id="name" label="name" /> 
            <p:outputLabel value="Persona" for="dd" />
            <p:autoComplete id="dd" dropdown="true" value="#{autoCompleteView.txt6}" completeMethod="#{autoCompleteView.completeText}" />            
            <h:outputText value="#{autoCompleteView.txt6}" />            
            <p:commandButton value="Buscar" onclick="PF('bar').show()" type="button" icon="ui-icon-arrow-1-s"/>
        </h:panelGrid>
        
        <h:form>
    <p:dataTable id="tbl" var="car" value="#{dataExporterView.cars}"
                 paginator="true" rows="10">
        <p:column>
            <f:facet name="header">
                <h:outputText value="Id Persona" />
            </f:facet>
            <h:outputText value="#{car.id}" />
        </p:column>
 
        <p:column>
            <f:facet name="header">
                <h:outputText value="Nombre Persona"/>
            </f:facet>
            <h:outputText value="#{car.year}" />
        </p:column>
 
        <p:column>
            <f:facet name="header">
                <h:outputText value="Monto Aportado" />
            </f:facet>
            <h:outputText value="#{car.brand}" />
        </p:column>
 
        <p:column>
            <f:facet name="header">
                <h:outputText value="Fecha" />
            </f:facet>
            <h:outputText value="#{car.color}" />
        </p:column>
 
    </p:dataTable>
 
    <h:panelGrid columns="2">
        <p:panel header="Export All Data">
            <h:commandLink id="excel">
                <p:graphicImage name="/demo/images/excel.png" />
                <p:dataExporter type="xls" target="tbl" fileName="cars" />
            </h:commandLink>
 
            <h:commandLink id="pdf">
                <p:graphicImage name="/demo/images/pdf.png" />
                <p:dataExporter type="pdf" target="tbl" fileName="cars"/>
            </h:commandLink>
 
            <h:commandLink id="csv">
                <p:graphicImage name="/demo/images/csv.png" />
                <p:dataExporter type="csv" target="tbl" fileName="cars" />
            </h:commandLink>
 
            <h:commandLink id="xml">
                <p:graphicImage name="/demo/images/xml.png" />
                <p:dataExporter type="xml" target="tbl" fileName="cars" />
            </h:commandLink>
        </p:panel>
 
        <p:panel header="Export Page Data">
            <h:commandLink>
                <p:graphicImage name="/demo/images/excel.png" />
                <p:dataExporter type="xls" target="tbl" fileName="cars" pageOnly="true"/>
            </h:commandLink>
 
            <h:commandLink>
                <p:graphicImage name="/demo/images/pdf.png" />
                <p:dataExporter type="pdf" target="tbl" fileName="cars" pageOnly="true" />
            </h:commandLink>
 
            <h:commandLink>
                <p:graphicImage name="/demo/images/csv.png" />
                <p:dataExporter type="csv" target="tbl" fileName="cars" pageOnly="true" />
            </h:commandLink>
 
            <h:commandLink>
                <p:graphicImage name="/demo/images/xml.png" />
                <p:dataExporter type="xml" target="tbl" fileName="cars" pageOnly="true" />
            </h:commandLink>
        </p:panel>
    </h:panelGrid>
</h:form>
        
    </p:dialog>
 
</h:form>     
         
</h:panelGrid>         
</h:form>
                    
                </p:layoutUnit>                          
    
            </p:layout>

             
        </h:body>

    </f:view>
</html>

